﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace GBSHouse.UptimeRobot {
	public class UptimeRobotMonitorLog {

		/// <summary>
		/// Gets or sets the type.
		/// </summary>
		/// <value>
		/// The type.
		/// </value>
		[JsonProperty("type")]
		public int Type { get; set; }

		/// <summary>
		/// Gets or sets the date.
		/// </summary>
		/// <value>
		/// The date.
		/// </value>
		[JsonProperty("datetime")]
		public DateTime Date { get; set; }

		/// <summary>
		/// Gets or sets the type of the uptime robot monitor log.
		/// </summary>
		/// <value>
		/// The type of the uptime robot monitor log.
		/// </value>
		[JsonIgnore]
		public UptimeRobotMonitorLogType UptimeRobotMonitorLogType {
			get { return (UptimeRobotMonitorLogType)this.Type; }
			set { this.Type = (int)value; }
		}
	}

	public enum UptimeRobotMonitorLogType : int {
		Unknown = 0,
		Down = 1,
		Up = 2,
		Started = 98,
		Paused = 99
	}
}
